//
//  IcAppModelsMngr.m
//  IceClear
//
//  Created by P & C on 3/21/11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import "IcAppModelsMngr.h"


@implementation IcAppModelsMngr

@synthesize recommendationsManager;
@synthesize materialsManager;


-(id)initWithDefaults {
	self = [super init];
	
	if (self) {
		// create default managers for Recommendation models and Material models
		
		self->recommendationsManager = [IcRecommendationsMngr recommendationsManager];
		self->materialsManager = [IcMaterialsMngr materialsManager];
		
		// the Recommendation models manager needs to know about the Material
		// models manager; so tell him about him
		self->recommendationsManager.materialsManager = self->materialsManager;
	}
	
	return self;
}

+(id)appModelsManager {
	IcAppModelsMngr* m = [[IcAppModelsMngr alloc] initWithDefaults];
	return m;
}

-(void)dealloc {
	[recommendationsManager release];
	[materialsManager release];
	[super dealloc];
}

@end
